package com.whfc.fse.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.whfc.fse.constant.CraneMeasurement;
import lombok.Data;
import org.influxdb.annotation.Column;
import org.influxdb.annotation.Measurement;

import java.io.Serializable;
import java.time.Instant;
import java.util.Date;
import java.util.concurrent.TimeUnit;

/**
 * @DESCRIPTION
 * @AUTHOR GuoDong_Sun
 * @DATE 2020/4/9
 */
@Data
@Measurement(name = CraneMeasurement.MEASUREMENT, database = CraneMeasurement.DATABASE, retentionPolicy = CraneMeasurement.RETENTION_POLICY, timeUnit = TimeUnit.SECONDS)
public class FseCraneDataLogDTO implements Serializable {

    /**
     * 硬件时间
     */
    @JsonFormat(pattern = "HH:mm")
    private Date time;

    /**
     * 服务器时间
     */
    private Date createTime;

    /**
     * 硬件时间
     */
    @JsonIgnore
    @Column(name = "time")
    private Instant deviceTime;

    /**
     * 服务器时间
     */
    @JsonIgnore
    @Column(name = "serverTime")
    private Long serverTime;

    /**
     * 幅度
     */
    @Column(name = "range")
    private Double range;

    /**
     * 吊钩高度
     */
    @Column(name = "height")
    private Double height;

    /**
     * 吊重
     */
    @Column(name = "weight")
    private Double weight;

    /**
     * 风速
     */
    @Column(name = "windSpeed")
    private Double windSpeed;

    /**
     * 倾角
     */
    @Column(name = "dipAngle")
    private Double dipAngle;

    /**
     * 转角
     */
    @Column(name = "turnAngle")
    private Double turnAngle;

    /**
     * 力矩比
     */
    @Column(name = "momentRatio")
    private Double momentRatio;

}
